<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Russian Dolls for the Maximum Stable Set Problem: graph/bitmap.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Russian Dolls for the Maximum Stable Set Problem
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_12552d7fa429bf94a2e32e5cf39f7e69.html">graph</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a>  </div>
  <div class="headertitle">
<div class="title">bitmap.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Macros and inline functions for bitwise operations on bitmaps using bit-parallelism.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stddef.h&gt;</code><br/>
</div>
<p><a href="bitmap_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a403cf3149c084cea115b85c90721039a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a403cf3149c084cea115b85c90721039a">BSIZE</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:a403cf3149c084cea115b85c90721039a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of bits in a node.  <a href="#a403cf3149c084cea115b85c90721039a"></a><br/></td></tr>
<tr class="memitem:a7edb6b8a8c89cb564d6e1b85ed80e7db"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a7edb6b8a8c89cb564d6e1b85ed80e7db">WSIZE</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:a7edb6b8a8c89cb564d6e1b85ed80e7db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of bytes in a node.  <a href="#a7edb6b8a8c89cb564d6e1b85ed80e7db"></a><br/></td></tr>
<tr class="memitem:afced88f944530b6dfb95807ae45120a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#afced88f944530b6dfb95807ae45120a6">LOGB</a>&#160;&#160;&#160;3</td></tr>
<tr class="memdesc:afced88f944530b6dfb95807ae45120a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logarithmic of BSIZE.  <a href="#afced88f944530b6dfb95807ae45120a6"></a><br/></td></tr>
<tr class="memitem:ac6f0b43ab85743ce5de50d53bda6de62"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#ac6f0b43ab85743ce5de50d53bda6de62">LOGW</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:ac6f0b43ab85743ce5de50d53bda6de62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logarithmic of WSIZE.  <a href="#ac6f0b43ab85743ce5de50d53bda6de62"></a><br/></td></tr>
<tr class="memitem:adaab21e44ecc67f293c370259571617c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#adaab21e44ecc67f293c370259571617c">LOGBW</a>&#160;&#160;&#160;3</td></tr>
<tr class="memdesc:adaab21e44ecc67f293c370259571617c"><td class="mdescLeft">&#160;</td><td class="mdescRight">LOGB <code>+</code> LOGW.  <a href="#adaab21e44ecc67f293c370259571617c"></a><br/></td></tr>
<tr class="memitem:a206b6f5362e56b51ca957635350b70b6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:a206b6f5362e56b51ca957635350b70b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Node set to <code>1</code>.  <a href="#a206b6f5362e56b51ca957635350b70b6"></a><br/></td></tr>
<tr class="memitem:af7ff4ea4784ba1f3d083f292fa8858a5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#af7ff4ea4784ba1f3d083f292fa8858a5">NODEMAX</a>&#160;&#160;&#160;0xFF</td></tr>
<tr class="memdesc:af7ff4ea4784ba1f3d083f292fa8858a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Node's maximum value.  <a href="#af7ff4ea4784ba1f3d083f292fa8858a5"></a><br/></td></tr>
<tr class="memitem:a44f677bb805ccf52a98b641df22ad839"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a44f677bb805ccf52a98b641df22ad839">MASKB</a>&#160;&#160;&#160;0x07</td></tr>
<tr class="memdesc:a44f677bb805ccf52a98b641df22ad839"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask used to select the LOGB least significant bits.  <a href="#a44f677bb805ccf52a98b641df22ad839"></a><br/></td></tr>
<tr class="memitem:ad1979fd3808c70cc2eaf720ec1816a21"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#ad1979fd3808c70cc2eaf720ec1816a21">MASKSZ</a>&#160;&#160;&#160;9</td></tr>
<tr class="memdesc:ad1979fd3808c70cc2eaf720ec1816a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of elements in __mask.  <a href="#ad1979fd3808c70cc2eaf720ec1816a21"></a><br/></td></tr>
<tr class="memitem:aebeb87d7e27e1bd467b131d39e26a550"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#aebeb87d7e27e1bd467b131d39e26a550">NODECOUNTER</a>(w)&#160;&#160;&#160;__builtin_popcount(w)</td></tr>
<tr class="memdesc:aebeb87d7e27e1bd467b131d39e26a550"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builtin function: Returns the number of 1-bits in <code>w</code>.  <a href="#aebeb87d7e27e1bd467b131d39e26a550"></a><br/></td></tr>
<tr class="memitem:afc75c90250f604f7b39bd95b31065060"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#afc75c90250f604f7b39bd95b31065060">NODELEAST</a>(w)&#160;&#160;&#160;(__builtin_ffs(w)-1)</td></tr>
<tr class="memdesc:afc75c90250f604f7b39bd95b31065060"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builtin function: Returns the index of the least significant 1-bit of <code>w</code>, or if <code>w</code> is zero, returns <code>-1</code>.  <a href="#afc75c90250f604f7b39bd95b31065060"></a><br/></td></tr>
<tr class="memitem:a221a194080aa8915012589aad1242b0f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a221a194080aa8915012589aad1242b0f">NODENEXTLEAST</a>(w, i)&#160;&#160;&#160;(__builtin_ffs(w &amp; __mask[i + 1])-1)</td></tr>
<tr class="memdesc:a221a194080aa8915012589aad1242b0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builtin function: Returns the index of the least significant 1-bit of <code>w</code> greater than <code>i</code>, or if <code>w</code> is zero, returns <code>-1</code>.  <a href="#a221a194080aa8915012589aad1242b0f"></a><br/></td></tr>
<tr class="memitem:a2d04be6fd312695e90eaf4c44d59c8fd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a2d04be6fd312695e90eaf4c44d59c8fd">NODEMOST</a>(i)&#160;&#160;&#160;(<a class="el" href="bitmap_8h.html#a403cf3149c084cea115b85c90721039a">BSIZE</a>-__builtin_clz(i)-1)</td></tr>
<tr class="memdesc:a2d04be6fd312695e90eaf4c44d59c8fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builtin function: Returns the index of the most significant 1-bit of <code>w</code>, or if <code>w</code> is zero, returns <code>-1</code>.  <a href="#a2d04be6fd312695e90eaf4c44d59c8fd"></a><br/></td></tr>
<tr class="memitem:a40516649a3771e319c376d4ca991cd3d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a40516649a3771e319c376d4ca991cd3d">NODEPREVMOST</a>(w, i)&#160;&#160;&#160;(<a class="el" href="bitmap_8h.html#a403cf3149c084cea115b85c90721039a">BSIZE</a>-__builtin_clz(w &amp; ~__mask[i])-1)</td></tr>
<tr class="memdesc:a40516649a3771e319c376d4ca991cd3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Builtin function: Returns the index of the most significant 1-bit of <code>w</code> smaller than <code>i</code>, or if <code>w</code> is zero, returns <code>-1</code>.  <a href="#a40516649a3771e319c376d4ca991cd3d"></a><br/></td></tr>
<tr class="memitem:a4642ff745cdc525c7566b436f452e33f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a4642ff745cdc525c7566b436f452e33f">NELEM</a>(i)&#160;&#160;&#160;((i) &lt;&lt; <a class="el" href="bitmap_8h.html#afced88f944530b6dfb95807ae45120a6">LOGB</a>)</td></tr>
<tr class="memdesc:a4642ff745cdc525c7566b436f452e33f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Smallest element in the entry <code>i</code> of the bitmap.  <a href="#a4642ff745cdc525c7566b436f452e33f"></a><br/></td></tr>
<tr class="memitem:ab8ce022c2df6a106a810279b8fa255fb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(i)&#160;&#160;&#160;((i) &gt;&gt; <a class="el" href="bitmap_8h.html#afced88f944530b6dfb95807ae45120a6">LOGB</a>)</td></tr>
<tr class="memdesc:ab8ce022c2df6a106a810279b8fa255fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Node index in the bitmap of element <code>i</code>.  <a href="#ab8ce022c2df6a106a810279b8fa255fb"></a><br/></td></tr>
<tr class="memitem:a38e54c56fc0272a1b9d42ba71935bb25"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(i)&#160;&#160;&#160;((i) &amp; <a class="el" href="bitmap_8h.html#a44f677bb805ccf52a98b641df22ad839">MASKB</a>)</td></tr>
<tr class="memdesc:a38e54c56fc0272a1b9d42ba71935bb25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Element index in the corresponding node of the bitmap.  <a href="#a38e54c56fc0272a1b9d42ba71935bb25"></a><br/></td></tr>
<tr class="memitem:a14fc6dc47eef5bf11c7f0cc62d5810be"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a14fc6dc47eef5bf11c7f0cc62d5810be">ISINNODE</a>(w, i)&#160;&#160;&#160;((w) &amp; (<a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a> &lt;&lt; (i)))</td></tr>
<tr class="memdesc:a14fc6dc47eef5bf11c7f0cc62d5810be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a node set to a non-zero value if the bit of index <code>i</code> in node <code>w</code> is a 1-bit; otherwise a node set to <code>0</code>.  <a href="#a14fc6dc47eef5bf11c7f0cc62d5810be"></a><br/></td></tr>
<tr class="memitem:a30192306152a036a64b05241e9efa9dc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a30192306152a036a64b05241e9efa9dc">ISINSET</a>(T, i)&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#a14fc6dc47eef5bf11c7f0cc62d5810be">ISINNODE</a>(T[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(i)], <a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(i))</td></tr>
<tr class="memdesc:a30192306152a036a64b05241e9efa9dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a node set to a non-zero value if the element <code>i</code> is in the bitmap <code>T</code>; otherwise a node set to <code>0</code>.  <a href="#a30192306152a036a64b05241e9efa9dc"></a><br/></td></tr>
<tr class="memitem:ab49b1a17c43250b876e6ff5f0afb03c3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#ab49b1a17c43250b876e6ff5f0afb03c3">DELFROMNODE</a>(w, i)&#160;&#160;&#160;((w) &amp; ~(<a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a> &lt;&lt; (i)))</td></tr>
<tr class="memdesc:ab49b1a17c43250b876e6ff5f0afb03c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes bit <code>i</code> from node <code>w</code>.  <a href="#ab49b1a17c43250b876e6ff5f0afb03c3"></a><br/></td></tr>
<tr class="memitem:a0eb72bff3ce11daf1a05821253a8c649"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a0eb72bff3ce11daf1a05821253a8c649">ADDTONODE</a>(w, i)&#160;&#160;&#160;((w) | (<a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a> &lt;&lt; (i)))</td></tr>
<tr class="memdesc:a0eb72bff3ce11daf1a05821253a8c649"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds bit <code>i</code> to node <code>w</code>.  <a href="#a0eb72bff3ce11daf1a05821253a8c649"></a><br/></td></tr>
<tr class="memitem:af41c5c0abda248b11f69efd096a1e608"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#af41c5c0abda248b11f69efd096a1e608">ADDALL</a>(R, n)&#160;&#160;&#160;memset(R, 0xFF, ((n) &lt;&lt; LOGW))</td></tr>
<tr class="memdesc:af41c5c0abda248b11f69efd096a1e608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds all elements to bitmap <code>R</code>.  <a href="#af41c5c0abda248b11f69efd096a1e608"></a><br/></td></tr>
<tr class="memitem:adec2f6c1d7052166719b2563964c74fd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#adec2f6c1d7052166719b2563964c74fd">DELALL</a>(R, n)&#160;&#160;&#160;memset(R, 0, ((n) &lt;&lt; <a class="el" href="bitmap_8h.html#ac6f0b43ab85743ce5de50d53bda6de62">LOGW</a>))</td></tr>
<tr class="memdesc:adec2f6c1d7052166719b2563964c74fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes all elements from bitmap <code>R</code>.  <a href="#adec2f6c1d7052166719b2563964c74fd"></a><br/></td></tr>
<tr class="memitem:ad0810fd203c326b7b5d6d655b5b62d69"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#ad0810fd203c326b7b5d6d655b5b62d69">COPYALL</a>(R, S, n)&#160;&#160;&#160;memcpy(R, S, ((n) &lt;&lt; <a class="el" href="bitmap_8h.html#ac6f0b43ab85743ce5de50d53bda6de62">LOGW</a>))</td></tr>
<tr class="memdesc:ad0810fd203c326b7b5d6d655b5b62d69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy <code>n</code> nodes from bitmap <code>S</code> to bitmap <code>R</code>.  <a href="#ad0810fd203c326b7b5d6d655b5b62d69"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a5047cbfad0b49c9f1c7a57ddbee2009a"><td class="memItemLeft" align="right" valign="top">typedef unsigned long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a></td></tr>
<tr class="memdesc:a5047cbfad0b49c9f1c7a57ddbee2009a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bitmap node's type.  <a href="#a5047cbfad0b49c9f1c7a57ddbee2009a"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Macros and inline functions for bitwise operations on bitmaps using bit-parallelism. </p>
<dl class="section date"><dt>Date:</dt><dd>Sep 24, 2013 </dd></dl>
<dl class="section author"><dt>Author:</dt><dd>Ricardo C. Corrêa (<a href="#" onclick="location.href='mai'+'lto:'+'cor'+'re'+'a@l'+'ia'+'.uf'+'c.'+'br'; return false;">corre<span style="display: none;">.nosp@m.</span>a@li<span style="display: none;">.nosp@m.</span>a.ufc<span style="display: none;">.nosp@m.</span>.br</a>)</dd></dl>
<p>A bitmap is an array of bits to represent sets in which a bit of index <code>i</code> represents element <code>i</code> of the set. For a bitmap <code>B</code>, <code>B</code>[<code>i</code>] <code>=</code> <code>1</code> means that element <code>i</code> is in the set; otherwise, <code>i</code> is not.</p>
<p>Bitmaps are defined as arrays of three different types depending on the number of bits per node, namely: <code>unsigned</code> <code>char</code> (8 bits per node), <code>unsigned</code> <code>long</code> <code>int</code> (32 bits per node), and <code>unsigned</code> <code>long</code> <code>long</code> <code>int</code> (64 bits per node). The type currently in use is selected by means of the definition of a macro name, respectively with <code>-D_ARCH8_</code>, <code>-D_ARCH32_</code>, or <code>-D_ARCH64_</code>, in the <code>gcc</code> command line. </p>
</div><hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="af41c5c0abda248b11f69efd096a1e608"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDALL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">R, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;memset(R, 0xFF, ((n) &lt;&lt; LOGW))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds all elements to bitmap <code>R</code>. </p>

</div>
</div>
<a class="anchor" id="a0eb72bff3ce11daf1a05821253a8c649"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADDTONODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((w) | (<a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a> &lt;&lt; (i)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds bit <code>i</code> to node <code>w</code>. </p>

</div>
</div>
<a class="anchor" id="a403cf3149c084cea115b85c90721039a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BSIZE&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Number of bits in a node. </p>

</div>
</div>
<a class="anchor" id="ad0810fd203c326b7b5d6d655b5b62d69"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COPYALL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">R, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">S, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;memcpy(R, S, ((n) &lt;&lt; <a class="el" href="bitmap_8h.html#ac6f0b43ab85743ce5de50d53bda6de62">LOGW</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy <code>n</code> nodes from bitmap <code>S</code> to bitmap <code>R</code>. </p>

</div>
</div>
<a class="anchor" id="adec2f6c1d7052166719b2563964c74fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DELALL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">R, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;memset(R, 0, ((n) &lt;&lt; <a class="el" href="bitmap_8h.html#ac6f0b43ab85743ce5de50d53bda6de62">LOGW</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deletes all elements from bitmap <code>R</code>. </p>

</div>
</div>
<a class="anchor" id="ab49b1a17c43250b876e6ff5f0afb03c3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DELFROMNODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((w) &amp; ~(<a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a> &lt;&lt; (i)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deletes bit <code>i</code> from node <code>w</code>. </p>

</div>
</div>
<a class="anchor" id="a38e54c56fc0272a1b9d42ba71935bb25"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IDXINNODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i</td><td>)</td>
          <td>&#160;&#160;&#160;((i) &amp; <a class="el" href="bitmap_8h.html#a44f677bb805ccf52a98b641df22ad839">MASKB</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Element index in the corresponding node of the bitmap. </p>

</div>
</div>
<a class="anchor" id="a14fc6dc47eef5bf11c7f0cc62d5810be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ISINNODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((w) &amp; (<a class="el" href="bitmap_8h.html#a206b6f5362e56b51ca957635350b70b6">ONE</a> &lt;&lt; (i)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a node set to a non-zero value if the bit of index <code>i</code> in node <code>w</code> is a 1-bit; otherwise a node set to <code>0</code>. </p>

</div>
</div>
<a class="anchor" id="a30192306152a036a64b05241e9efa9dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ISINSET</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">T, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="bitmap_8h.html#a14fc6dc47eef5bf11c7f0cc62d5810be">ISINNODE</a>(T[<a class="el" href="bitmap_8h.html#ab8ce022c2df6a106a810279b8fa255fb">NODEIDX</a>(i)], <a class="el" href="bitmap_8h.html#a38e54c56fc0272a1b9d42ba71935bb25">IDXINNODE</a>(i))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a node set to a non-zero value if the element <code>i</code> is in the bitmap <code>T</code>; otherwise a node set to <code>0</code>. </p>

</div>
</div>
<a class="anchor" id="afced88f944530b6dfb95807ae45120a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LOGB&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Logarithmic of BSIZE. </p>

</div>
</div>
<a class="anchor" id="adaab21e44ecc67f293c370259571617c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LOGBW&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>LOGB <code>+</code> LOGW. </p>

</div>
</div>
<a class="anchor" id="ac6f0b43ab85743ce5de50d53bda6de62"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LOGW&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Logarithmic of WSIZE. </p>

</div>
</div>
<a class="anchor" id="a44f677bb805ccf52a98b641df22ad839"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MASKB&#160;&#160;&#160;0x07</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mask used to select the LOGB least significant bits. </p>

</div>
</div>
<a class="anchor" id="ad1979fd3808c70cc2eaf720ec1816a21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MASKSZ&#160;&#160;&#160;9</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Number of elements in __mask. </p>

</div>
</div>
<a class="anchor" id="a4642ff745cdc525c7566b436f452e33f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NELEM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i</td><td>)</td>
          <td>&#160;&#160;&#160;((i) &lt;&lt; <a class="el" href="bitmap_8h.html#afced88f944530b6dfb95807ae45120a6">LOGB</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Smallest element in the entry <code>i</code> of the bitmap. </p>

</div>
</div>
<a class="anchor" id="aebeb87d7e27e1bd467b131d39e26a550"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODECOUNTER</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w</td><td>)</td>
          <td>&#160;&#160;&#160;__builtin_popcount(w)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builtin function: Returns the number of 1-bits in <code>w</code>. </p>

</div>
</div>
<a class="anchor" id="ab8ce022c2df6a106a810279b8fa255fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODEIDX</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i</td><td>)</td>
          <td>&#160;&#160;&#160;((i) &gt;&gt; <a class="el" href="bitmap_8h.html#afced88f944530b6dfb95807ae45120a6">LOGB</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Node index in the bitmap of element <code>i</code>. </p>

</div>
</div>
<a class="anchor" id="afc75c90250f604f7b39bd95b31065060"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODELEAST</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w</td><td>)</td>
          <td>&#160;&#160;&#160;(__builtin_ffs(w)-1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builtin function: Returns the index of the least significant 1-bit of <code>w</code>, or if <code>w</code> is zero, returns <code>-1</code>. </p>

</div>
</div>
<a class="anchor" id="af7ff4ea4784ba1f3d083f292fa8858a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODEMAX&#160;&#160;&#160;0xFF</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Node's maximum value. </p>

</div>
</div>
<a class="anchor" id="a2d04be6fd312695e90eaf4c44d59c8fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODEMOST</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i</td><td>)</td>
          <td>&#160;&#160;&#160;(<a class="el" href="bitmap_8h.html#a403cf3149c084cea115b85c90721039a">BSIZE</a>-__builtin_clz(i)-1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builtin function: Returns the index of the most significant 1-bit of <code>w</code>, or if <code>w</code> is zero, returns <code>-1</code>. </p>

</div>
</div>
<a class="anchor" id="a221a194080aa8915012589aad1242b0f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODENEXTLEAST</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(__builtin_ffs(w &amp; __mask[i + 1])-1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builtin function: Returns the index of the least significant 1-bit of <code>w</code> greater than <code>i</code>, or if <code>w</code> is zero, returns <code>-1</code>. </p>

</div>
</div>
<a class="anchor" id="a40516649a3771e319c376d4ca991cd3d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NODEPREVMOST</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">w, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">i&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(<a class="el" href="bitmap_8h.html#a403cf3149c084cea115b85c90721039a">BSIZE</a>-__builtin_clz(w &amp; ~__mask[i])-1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Builtin function: Returns the index of the most significant 1-bit of <code>w</code> smaller than <code>i</code>, or if <code>w</code> is zero, returns <code>-1</code>. </p>

</div>
</div>
<a class="anchor" id="a206b6f5362e56b51ca957635350b70b6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ONE&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Node set to <code>1</code>. </p>

</div>
</div>
<a class="anchor" id="a7edb6b8a8c89cb564d6e1b85ed80e7db"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WSIZE&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Number of bytes in a node. </p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a5047cbfad0b49c9f1c7a57ddbee2009a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bitmap node's type. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 14 2014 13:23:35 for Russian Dolls for the Maximum Stable Set Problem by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
